package com.yqg.education.mapper;

import com.yqg.education.entity.Period;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 张芸博
 * @since 2025-04-10
 */
@Mapper
public interface PeriodMapper extends BaseMapper<Period> {
    List<Period> pageList(Integer pageNum, Integer pageSize, String name, Integer courseId);

    Long findCount(String name, Integer courseId);

    List<Period> findPeriodByCourseId(@Param("pageStartNumber") Integer pageStartNumber, @Param("pageSize") Integer pageSize, @Param("courseId") Integer courseId, @Param("userId") Integer userId);

    Long findPeriodCount(@Param("courseId") Integer courseId, @Param("userId") Integer userId);

    Long getInfoCount();

    List<Period> getPdfData(List<Long> courseIds);
}
